package com.ieen.mybatis.client;

import com.alibaba.fastjson.JSON;
import com.ieen.mybatis.config.XmlConfigInit;
import com.ieen.mybatis.mapper.RoleMapper;
import org.apache.ibatis.javassist.bytecode.LineNumberAttribute;
import org.apache.ibatis.session.SqlSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Map;

public class PcClient {
    private final static Logger log = LoggerFactory.getLogger(PcClient.class);

    public static void main(String[] args) {
        // 默认 autoCommit=false
        SqlSession sqlSession = XmlConfigInit.defaultSqlSessionFactory.openSession();
        RoleMapper roleMapper = sqlSession.getMapper(RoleMapper.class);
        List<Map<String, Object>> resultList = null;
        int queryTimes = 3;
        do {
            resultList = roleMapper.listObjs("");
        } while(queryTimes -- > 0);

    }
}
